package mastermind.gui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import mastermind.gui.Frame;

public class YellowAction extends AbstractAction{

	private Frame frame;
	
	public YellowAction(Frame frame){
		
		this.frame = frame;
		
	}
	@Override
	public void actionPerformed(ActionEvent e) {

		int col = frame.getBoardTable().getSelectedColumn();
		int row = frame.getBoardTable().getSelectedRow();
		frame.getBoardTable().setValueAt("YELLOW", row, col); //set colour to yellow
	}

}
